<template>
  <div>
     pinia写法2使用
     <h1>state:{{uStore.userName}}</h1>
      <h1>getters:{{uStore.douName}}</h1>
      <button @click="changeName">触发actions改变名字</button>
  </div>
</template>
<script setup>
import {userNameStore} from '../../pstore/index'
let uStore=userNameStore();
let changeName=()=>{
  // 触发actions 修改state的值
   uStore.setName("建国同志")
}

</script>